//
// Created by xsm on 17-5-1.
//
//导入头文件
#include "com_xsm_ppsecret_util_NativeHelper.h"


JNIEXPORT jstring JNICALL
Java_com_xsm_ppsecret_util_NativeHelper_getAesKeyKeyFromC(JNIEnv *env, jclass type) {

    const char *string = "i love you s y h 8023";


    return (*env)->NewStringUTF(env, string);
}

/**
 * 获取AppKey
 */
JNIEXPORT jstring JNICALL
        Java_com_xsm_ppsecret_util_NativeHelper_getAppKey(JNIEnv *env, jclass type)
{
        const char *str = "my name is xsm123";
        //生成Java中的字符串对象
        //指针的指针

        // env => JNINativeInterface **
        jstring ret = (*env)->NewStringUTF(env, str);
        return ret;
}

/**
 * 获取AppSecret
 */
JNIEXPORT jstring JNICALL
        Java_com_xsm_ppsecret_util_NativeHelper_getAppSecret(JNIEnv *env, jclass type)
{
        const char *str = "cv56a4dsf6as4fa6s4fasdfa46s54fd";
        //生成Java中的字符串对象
        //指针的指针

        // env => JNINativeInterface **
        jstring ret = (*env)->NewStringUTF(env, str);
        return ret;
}

JNIEXPORT jint JNICALL
Java_com_xsm_ppsecret_util_NativeHelper_add(JNIEnv *env, jclass type, jint a, jint b)
{
        return a + b;


}